class Student {
  fullName: string;
  // public 等同于创建了同名的成员变量
  firstName: string; // 成员变量
  lastName: string; // 成员变量
  constructor(firstName: string, lastName: string) {
    this.firstName = firstName;
    this.lastName = lastName;
    this.fullName = this.firstName + this.lastName;
  }
}

interface IPerson {
  firstName: string;
  lastName: string;
}

function greeter2(user: IPerson): string {
  return "hello" + user.firstName + user.lastName;
}

const stu = new Student("程", "nuo");

console.log(greeter2(stu));
